package com.skzh.equipment.service.impl;

import java.util.List;
        import com.skzh.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.skzh.equipment.mapper.HailerModelInfoMapper;
import com.skzh.equipment.domain.HailerModelInfo;
import com.skzh.equipment.service.IHailerModelInfoService;

/**
 * 喊话器型号信息Service业务层处理
 *
 * @author skzh
 * @date 2025-03-25
 */
@Service
public class HailerModelInfoServiceImpl implements IHailerModelInfoService {
    @Autowired
    private HailerModelInfoMapper hailerModelInfoMapper;

    /**
     * 查询喊话器型号信息
     *
     * @param modelId 喊话器型号信息主键
     * @return 喊话器型号信息
     */
    @Override
    public HailerModelInfo selectHailerModelInfoByModelId(Long modelId) {
        return hailerModelInfoMapper.selectHailerModelInfoByModelId(modelId);
    }

    /**
     * 查询喊话器型号信息列表
     *
     * @param hailerModelInfo 喊话器型号信息
     * @return 喊话器型号信息
     */
    @Override
    public List<HailerModelInfo> selectHailerModelInfoList(HailerModelInfo hailerModelInfo) {
        return hailerModelInfoMapper.selectHailerModelInfoList(hailerModelInfo);
    }

    /**
     * 新增喊话器型号信息
     *
     * @param hailerModelInfo 喊话器型号信息
     * @return 结果
     */
    @Override
    public int insertHailerModelInfo(HailerModelInfo hailerModelInfo) {
                hailerModelInfo.setCreateTime(DateUtils.getNowDate());
            return hailerModelInfoMapper.insertHailerModelInfo(hailerModelInfo);
    }

    /**
     * 修改喊话器型号信息
     *
     * @param hailerModelInfo 喊话器型号信息
     * @return 结果
     */
    @Override
    public int updateHailerModelInfo(HailerModelInfo hailerModelInfo) {
                hailerModelInfo.setUpdateTime(DateUtils.getNowDate());
        return hailerModelInfoMapper.updateHailerModelInfo(hailerModelInfo);
    }

    /**
     * 批量删除喊话器型号信息
     *
     * @param modelIds 需要删除的喊话器型号信息主键
     * @return 结果
     */
    @Override
    public int deleteHailerModelInfoByModelIds(Long[] modelIds) {
        return hailerModelInfoMapper.deleteHailerModelInfoByModelIds(modelIds);
    }

    /**
     * 删除喊话器型号信息信息
     *
     * @param modelId 喊话器型号信息主键
     * @return 结果
     */
    @Override
    public int deleteHailerModelInfoByModelId(Long modelId) {
        return hailerModelInfoMapper.deleteHailerModelInfoByModelId(modelId);
    }
}
